export  default {
	state: {
		token: '',
		userId: '',
		username: '',
		nickName: '',
		avatarUrl: '',
		email: ''
	},
	mutations: {
		setToken(state, token) {
			state.token = token;
		},
		setUserInfo(state, userInfo) {
			state.userId = userInfo.id,
			state.username = userInfo.username;
			state.nickName = userInfo.nickName;
			state.avatarUrl = userInfo.avatarUrl;
			state.email = userInfo.email;
		},
		clearUser(state) {
			state.token = '';
			state.userId = '';
			state.username = '';
			state.nickName = '';
			state.avatarUrl = '';
			state.email = '';
		}
		
	}
}